<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Lang')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
                {foreach name="langList" item="vo"}
                <label>
                    <input name="row[lang]" type="radio" value="{$vo.slug}" {if $vo.is_default==1 }checked{/if}/>
                    {$vo.title}
                </label>
                {/foreach}
                <span><button type="button" id="baidu_trans" class="btn btn-danger" ><i class="fa fa-language"></i> {:__('翻译')}</button></span>
            </div>

        </div>
    </div>
    <div class="form-group" data-favisible="lang=zh_cn">
        <label class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
        <div class="col-xs-12 col-sm-8">
                        
            <select  id="c-type" data-rule="required" class="form-control selectpicker" name="row[type]">
                {foreach name="typeList" item="vo"}
                    <option value="{$key}" {in name="key" value="$row.type"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group" data-favisible="lang=zh_cn&&type=house">
        <label class="control-label col-xs-12 col-sm-2">{:__('Houseorhome')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
                <label>
                    <input name="row[houseorhome]" type="radio" value="0" {if $row.houseorhome==0 }checked{/if}/>
                    酒店
                </label>
                <label>
                    <input name="row[houseorhome]" type="radio" value="1" {if $row.houseorhome==1 }checked{/if}/>
                    房间
                </label>
            </div>

        </div>
    </div>
    <div class="form-group" data-favisible="lang=zh_cn&&type=house&&houseorhome=1">
        <label for="c-pid" class="control-label col-xs-12 col-sm-2">{:__('Pid')}:</label>
        <div class="col-xs-12 col-sm-8">

            <select id="c-pid" data-rule="required" class="form-control selectpicker" name="row[pid]">
                <option value="0">添加房间时请选择</option>
                {foreach name="houseList" item="vo"}
                <option value="{$vo.id}"  {in name="$vo.id" value="$row.pid"}selected{/in}>{$vo.title}</option>
                {/foreach}
            </select>

        </div>
    </div>

    <div class="form-group" data-favisible="lang=zh_cn">
        <label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text" value="{$row.title|htmlentities}">
        </div>
    </div>
    <div class="form-group" data-favisible="lang=zh_cn">
        <label class="control-label col-xs-12 col-sm-2">{:__('Subtitle')}/路线:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-subtitle" class="form-control" name="row[subtitle]" type="text" value="{$row.subtitle|htmlentities}">
        </div>
    </div>
    <div class="form-group" data-favisible="lang=zh_cn&&type=house&&houseorhome=0">
        <label class="control-label col-xs-12 col-sm-2">{:__('House_satr')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-house_satr"  class="form-control" name="row[house_satr]" type="number" value="{$row.house_satr}">
        </div>
    </div>
    <div class="form-group" data-favisible="lang=zh_cn&&type=house&&houseorhome=0">
        <label class="control-label col-xs-12 col-sm-2">{:__('Phone')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-phone" class="form-control" name="row[phone]" type="text" value="{$row.phone|htmlentities}">
        </div>
    </div>
    <div class="form-group" data-favisible="lang=zh_cn&&type=house&&houseorhome=0">
        <label class="control-label col-xs-12 col-sm-2">{:__('Address')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-address" class="form-control" name="row[address]" type="text" value="{$row.address|htmlentities}">
        </div>
    </div>

    <div class="form-group" data-favisible="lang=zh_cn&&type=house&&houseorhome=1">
        <label class="control-label col-xs-12 col-sm-2">{:__('Home_num')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-home_num" class="form-control" name="row[home_num]" type="number" value="{$row.home_num}">
        </div>
    </div>
    <div class="form-group" data-favisible="lang=zh_cn&&type=house&&houseorhome=1">
        <label class="control-label col-xs-12 col-sm-2">{:__('Home_seat')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-home_seat" class="form-control" name="row[home_seat]" type="number" value="{$row.home_seat}">
        </div>
    </div>

    <div class="form-group" data-favisible="lang=zh_cn&&type=car">
        <label class="control-label col-xs-12 col-sm-2">{:__('Car_seat')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select  id="c-car_seat" class="form-control selectpicker" name="row[car_seat]">
                <option value="0">请选择</option>
                {foreach name="carSeatArr" item="vo"}
                <option value="{$vo}" {in name="vo" value="$row.car_seat"}selected{/in}>{$vo} 座</option>
                {/foreach}
            </select>
        </div>
    </div>
    <div class="form-group" data-favisible="lang=zh_cn&&type=trip">
        <label class="control-label col-xs-12 col-sm-2">{:__('Trip_day')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select  id="c-trip_day" class="form-control selectpicker" name="row[trip_day]">
                <option value="0">请选择</option>
                {foreach name="tripDayArr" item="vo"}
                <option value="{$vo}" {in name="vo" value="$row.trip_day"}selected{/in}>{$vo} 日游</option>
                {/foreach}
            </select>
        </div>
    </div>

    <div class="form-group" data-favisible="lang=zh_cn">
        <label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-image" class="form-control" size="50" name="row[image]" type="text" value="{$row.image|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-image" class="btn btn-danger faupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-image"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-image"></ul>
        </div>
    </div>
    <div class="form-group" data-favisible="lang=zh_cn">
        <label class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-images" class="form-control" size="50" name="row[images]" type="text" value="{$row.images|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-images" class="btn btn-danger faupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-images"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-images"></ul>
        </div>
    </div>
    <div class="form-group" data-favisible="lang=zh_cn&&type=house,car,trip">
        <label class="control-label col-xs-12 col-sm-2">{:__('Service_ids')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-service_ids" data-source="travel/service/index" data-field="title" data-multiple="true" class="form-control selectpage" name="row[service_ids]" type="text" value="{$row.service_ids|htmlentities}">
        </div>
    </div>
    <div class="form-group" data-favisible="lang=zh_cn&&type=house,car,trip">
        <label class="control-label col-xs-12 col-sm-2">{:__('Price')}<span data-favisible="type=car">【接机】<span>:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-price" class="form-control" step="0.01" name="row[price]" type="number" value="{$row.price|htmlentities}">
        </div>
    </div>
    <div class="form-group" data-favisible="lang=zh_cn&&type=car">
        <label class="control-label col-xs-12 col-sm-2">{:__('Price')}【送机】:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-price_song" class="form-control" step="0.01" name="row[price_song]" type="number" value="{$row.price_song|htmlentities}">
        </div>
    </div>
    <div class="form-group" data-favisible="lang=zh_cn&&type=car">
        <label class="control-label col-xs-12 col-sm-2">{:__('Price')}【往返】:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-price_jands" class="form-control" step="0.01" name="row[price_jands]" type="number" value="{$row.price_jands|htmlentities}">
        </div>
    </div>
    <div class="form-group" data-favisible="lang=zh_cn&&type=house,car,trip">
        <label class="control-label col-xs-12 col-sm-2">{:__('Original_price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-original_price" class="form-control" step="0.01" name="row[original_price]" type="number" value="{$row.original_price|htmlentities}">
        </div>
    </div>
    <div class="form-group" data-favisible="lang=zh_cn&&type=trip">
        <label class="control-label col-xs-12 col-sm-2">{:__('Date_price')}:</label>
        <div class="col-xs-12 col-sm-8">

            <table class="table fieldlist" data-name="row[date_price]" data-template="row[date_price]tpl">
                <tr>
                    <td>{:__('Date_price date')}</td>
                    <td>{:__('Date_price price')}</td>
                    <td width="90">{:__('Operate')}</td>
                </tr>
                <tr><td colspan="3">
                    <a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a>
                    <textarea name="row[date_price]" class="form-control hide" cols="30" rows="5">{$row.date_price|htmlentities}</textarea>
                </td></tr>
            </table>
            <script type="text/html" id="row[date_price]tpl">
                <tr>
                    <td>
                        <input
                                class="form-control datetimepicker"
                                data-date-format="YYYY-MM-DD"
                                data-use-current="true" name="<%=name%>[<%=index%>][date]" type="text" value="<%=row.date%>">
                    </td>
                    <td><input type="text" name="<%=name%>[<%=index%>][price]" class="form-control" value="<%=row.price%>"/></td>
                    <td width="90">
                        <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                        <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                    </td>
                </tr>
            </script>

        </div>
    </div>
    <div class="form-group" data-favisible="lang=zh_cn">
        <label class="control-label col-xs-12 col-sm-2">{:__('Is_stock')}:</label>
        <div class="col-xs-12 col-sm-8">

            <input  id="c-is_stock" name="row[is_stock]" type="hidden" value="{$row.is_stock}">
            <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-is_stock" data-yes="1" data-no="0" >
                <i class="fa fa-toggle-on text-success {eq name="$row.is_stock" value="0"}fa-flip-horizontal text-gray{/eq} fa-2x"></i>
            </a>
        </div>
    </div>
    <div class="form-group" data-favisible="lang=zh_cn&&is_stock=1">
        <label class="control-label col-xs-12 col-sm-2">{:__('Stock')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-stock" class="form-control" name="row[stock]" type="number" value="{$row.stock|htmlentities}">
        </div>
    </div>

    <div class="form-group" data-favisible="lang=zh_cn">
        <label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-content" class="form-control editor" rows="5" name="row[content]" cols="50">{$row.content|htmlentities}</textarea>
        </div>
    </div>
    <div class="form-group" data-favisible="lang=zh_cn&&type=house,car,trip">
        <label class="control-label col-xs-12 col-sm-2">{:__('Richtext_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-richtext_id" min="0" data-source="sum/richtext/index" data-params='{"custom[type]":"normal"}' data-field="title" class="form-control selectpage" name="row[richtext_id]" type="text" value="{$row.richtext_id|htmlentities}">
        </div>
    </div>

    <div class="form-group" data-favisible="lang=zh_cn">
        <label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-weigh" class="form-control" name="row[weigh]" type="number" value="{$row.weigh|htmlentities}">
        </div>
    </div>
    <div class="form-group" data-favisible="lang=zh_cn">
        <label class="control-label col-xs-12 col-sm-2">{:__('State')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="stateList" item="vo"}
            <label for="row[state]-{$key}"><input id="row[state]-{$key}" name="row[state]" type="radio" value="{$key}" {in name="key" value="$row.state"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>

    <div class="form-group" data-favisible="lang=zh_tw">
        <label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-lang_data-zh_tw-title" class="form-control" name="row[lang_data][zh_tw][title]" type="text" value="{$row.lang_data.zh_tw.title|htmlentities}">
        </div>
    </div>
    <div class="form-group" data-favisible="lang=zh_tw">
        <label class="control-label col-xs-12 col-sm-2">{:__('Subtitle')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-lang_data-zh_tw-subtitle" class="form-control" name="row[lang_data][zh_tw][subtitle]" type="text" value="{$row.lang_data.zh_tw.subtitle|htmlentities}">
        </div>
    </div>
    <div class="form-group" data-favisible="lang=zh_tw">
        <label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-lang_data-zh_tw-image" class="form-control" size="50" name="row[lang_data][zh_tw][image]" type="text" value="{$row.lang_data.zh_tw.image|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-lang_data-zh_tw-image" class="btn btn-danger faupload" data-input-id="c-lang_data-zh_tw-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-lang_data-zh_tw-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-lang_data-zh_tw-image" class="btn btn-primary fachoose" data-input-id="c-lang_data-zh_tw-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-lang_data-zh_tw-image"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-lang_data-zh_tw-image"></ul>
        </div>
    </div>
    <div class="form-group" data-favisible="lang=zh_tw">
        <label class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-lang_data-zh_tw-images" class="form-control" size="50" name="row[lang_data][zh_tw][images]" type="text" value="{$row.lang_data.zh_tw.images|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-lang_data-zh_tw-images" class="btn btn-danger faupload" data-input-id="c-lang_data-zh_tw-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-lang_data-zh_tw-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-lang_data-zh_tw-images" class="btn btn-primary fachoose" data-input-id="c-lang_data-zh_tw-images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-lang_data-zh_tw-images"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-lang_data-zh_tw-images"></ul>
        </div>
    </div>
    <div class="form-group" data-favisible="lang=zh_tw">
        <label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-lang_data-zh_tw-content" class="form-control editor" rows="5" name="row[lang_data][zh_tw][content]" cols="50">{$row.lang_data.zh_tw.content|htmlentities}</textarea>
        </div>
    </div>


    <div class="form-group" data-favisible="lang=en">
        <label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-lang_data-en-title" class="form-control" name="row[lang_data][en][title]" type="text" value="{$row.lang_data.en.title|htmlentities}">
        </div>
    </div>

    <div class="form-group" data-favisible="lang=en">
        <label class="control-label col-xs-12 col-sm-2">{:__('Subtitle')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-lang_data-en-subtitle" class="form-control" name="row[lang_data][en][subtitle]" type="text" value="{$row.lang_data.en.subtitle|htmlentities}">
        </div>
    </div>
    <div class="form-group" data-favisible="lang=en">
        <label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-lang_data-en-image" class="form-control" size="50" name="row[lang_data][en][image]" type="text" value="{$row.lang_data.en.image|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-lang_data-en-image" class="btn btn-danger faupload" data-input-id="c-lang_data-en-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-lang_data-en-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-lang_data-en-image" class="btn btn-primary fachoose" data-input-id="c-lang_data-en-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-lang_data-en-image"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-lang_data-en-image"></ul>
        </div>
    </div>
    <div class="form-group" data-favisible="lang=en">
        <label class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-lang_data-en-images" class="form-control" size="50" name="row[lang_data][en][images]" type="text" value="{$row.lang_data.en.images|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-lang_data-en-images" class="btn btn-danger faupload" data-input-id="c-lang_data-en-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-lang_data-en-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-lang_data-en-images" class="btn btn-primary fachoose" data-input-id="c-lang_data-en-images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-lang_data-en-images"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-lang_data-en-images"></ul>
        </div>
    </div>
    <div class="form-group" data-favisible="lang=en">
        <label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-lang_data-en-content" class="form-control editor" rows="5" name="row[lang_data][en][content]" cols="50">{$row.lang_data.en.content|htmlentities}</textarea>
        </div>
    </div>


    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
        </div>
    </div>
</form>
